# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexEndpoint do
  @moduledoc """
  Indexes are deployed into it. An IndexEndpoint can have multiple DeployedIndexes.

  ## Attributes

  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this IndexEndpoint was created.
  *   `deployedIndexes` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex.t)`, *default:* `nil`) - Output only. The indexes deployed in this endpoint.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of the IndexEndpoint.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The display name of the IndexEndpoint. The name can be up to 128 characters long and can consist of any UTF-8 characters.
  *   `enablePrivateServiceConnect` (*type:* `boolean()`, *default:* `nil`) - Optional. Deprecated: If true, expose the IndexEndpoint via private service connect. Only one of the fields, network or enable_private_service_connect, can be set.
  *   `encryptionSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t`, *default:* `nil`) - Immutable. Customer-managed encryption key spec for an IndexEndpoint. If set, this IndexEndpoint and all sub-resources of this IndexEndpoint will be secured by this key.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels with user-defined metadata to organize your IndexEndpoints. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the IndexEndpoint.
  *   `network` (*type:* `String.t`, *default:* `nil`) - Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the IndexEndpoint should be peered. Private services access must already be configured for the network. If left unspecified, the Endpoint is not peered with any network. network and private_service_connect_config are mutually exclusive. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in '12345', and {network} is network name.
  *   `privateServiceConnectConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PrivateServiceConnectConfig.t`, *default:* `nil`) - Optional. Configuration for private service connect. network and private_service_connect_config are mutually exclusive.
  *   `publicEndpointDomainName` (*type:* `String.t`, *default:* `nil`) - Output only. If public_endpoint_enabled is true, this field will be populated with the domain name to use for this index endpoint.
  *   `publicEndpointEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, the deployed index will be accessible through public endpoint.
  *   `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this IndexEndpoint was last updated. This timestamp is not updated when the endpoint's DeployedIndexes are updated, e.g. due to updates of the original Indexes they are the deployments of.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :createTime => DateTime.t() | nil,
          :deployedIndexes =>
            list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex.t()) | nil,
          :description => String.t() | nil,
          :displayName => String.t() | nil,
          :enablePrivateServiceConnect => boolean() | nil,
          :encryptionSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t() | nil,
          :etag => String.t() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :network => String.t() | nil,
          :privateServiceConnectConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PrivateServiceConnectConfig.t()
            | nil,
          :publicEndpointDomainName => String.t() | nil,
          :publicEndpointEnabled => boolean() | nil,
          :satisfiesPzi => boolean() | nil,
          :satisfiesPzs => boolean() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:createTime, as: DateTime)

  field(:deployedIndexes,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex,
    type: :list
  )

  field(:description)
  field(:displayName)
  field(:enablePrivateServiceConnect)
  field(:encryptionSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec)
  field(:etag)
  field(:labels, type: :map)
  field(:name)
  field(:network)

  field(:privateServiceConnectConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PrivateServiceConnectConfig
  )

  field(:publicEndpointDomainName)
  field(:publicEndpointEnabled)
  field(:satisfiesPzi)
  field(:satisfiesPzs)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexEndpoint do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexEndpoint.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexEndpoint do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
